<div id="app">
    <div class="logo"></div>
    <div class="search">
        <div class="search-input">
            <input type="text" :value="value" placeholder="输入关键词"><button>搜索</button>
        </div>
        <c-top></c-top>
    </div>
    <div class="search-list">
        <div class="search-item bold">
            <div class="search-item-name">
                <label><input type="radio" name="sort" class="search-filter" value="" :checked="sort===''">默认排序</label>
                <label><input type="radio" name="sort" class="search-filter" value="0" :checked="sort==='0'">大小升序</label>
                <label><input type="radio" name="sort" class="search-filter" value="1" :checked="sort==='1'">大小降序</label>
                <label><input type="radio" name="type" class="search-filter" value="" :checked="type===''">全部类型</label>
                <label><input type="radio" name="type" class="search-filter" value="0" :checked="type==='0'">视频</label>
                <label><input type="radio" name="type" class="search-filter" value="1" :checked="type==='1'">音频</label>
                <label><input type="radio" name="type" class="search-filter" value="2" :checked="type==='2'">图片</label>
                <label><input type="radio" name="type" class="search-filter" value="3" :checked="type==='3'">压缩包</label>
                <label><input type="radio" name="type" class="search-filter" value="4" :checked="type==='4'">文本</label>
                <label><input type="radio" name="type" class="search-filter" value="5" :checked="type==='5'">其它</label>
            </div>
            <div>收录时间</div>
        </div>
        <div v-if="list.length===0">无结果</div>
        <div v-else>
            <div class="search-item" v-for="(k,i) in list">
                <div class="search-item-name">
                    <a :href="'magnet:?xt=urn:btih:'+k.id" target="_blank" v-html="filterKeyword(k.name)"></a>
                    <div class="search-file">
                        <span>文件数量:</span>
                        <span class="flag file-type">{{k.filenums}}</span>
                        <span class="sep">|</span>
                        <span>文件大小:</span>
                        <span class="flag file-type">{{formatSize(k.filesize)}}</span>
                        <span class="sep">|</span>
                        <span>文件类型:</span>
                        <span class="flag">
                            <em v-for="p in getExtName(k.extname)" class="file-type">{{p}}</em>
                        </span>
                    </div>
                </div>
                <div>{{formatTime(k.create_time)}}</div>
            </div>
        </div>
    </div>
    <div class="page" v-if="list.length">
        <span :class="{disabled:page===1}" v-html="pager.prev"></span>
        <span :class="{disabled:page===1,active:page===1}" v-html="pager.first"></span>
        <span v-for="k in pageList" v-html="k.content" :class="{active:page===k.page}"></span>
        <span :class="{disabled:page===last,active:page===last}" v-html="pager.last" v-if="last!==1"></span>
        <span :class="{disabled:page===last}" v-html="pager.next"></span>
        <label>共{{total}}条</label>
    </div>
</div>